package com.myproject.thread.lock;

public class ThreadA extends Thread{

    Person p;

    public Person getP() {
        return p;
    }

    public void setP(Person p) {
        this.p = p;
    }

    @Override
    public void run() {
        System.out.println(Thread.currentThread()+" "+p.getGender());
    }
}
